package org.jeecg.config.deepseek;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {

    private final RequestLimitInterceptor requestLimitInterceptor;

    @Autowired
    public WebConfig(RequestLimitInterceptor requestLimitInterceptor) {
        this.requestLimitInterceptor = requestLimitInterceptor;
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        System.out.println("registry = " + registry);
        registry.addInterceptor(requestLimitInterceptor).addPathPatterns("/**/deepseek11/**");
    }
}
